Xbasic

QRCode::Creator::GenerateBmp Method

Syntax

PUBLIC STATIC GenerateBmp AS B (text AS C, correctionLevel AS C)

Arguments

text AS C

QRCode input

correctionLevel AS C

Correction level can be L,M,Q or H (L=7%, M=15%, Q=25%, H=30%). See QRCode Namespace for more information.

Description

Return a blob containing the contents of a windows .BMP formatted QRCode image.

Discussion

GenerateBmp creates a QR Code and returns a blob containing a bitmap image.

Example

dim bmpData as b = ::QRCode::Creator::GenerateBmp("Hello world","M")
dim html as c = "<p><img src=\"data:image/bmp;base64," + base64encode(bmpData)+"\" /></p>"
a5_show_html(html)

See Also